Necklaces , Convolutions , and X +
نویسندگان
چکیده
We give subquadratic algorithms that, given two necklaces each with n beads at arbitrary positions, compute the optimal rotation of the necklaces to best align the beads. Here alignment is measured according to the `p norm of the vector of distances between pairs of beads from opposite necklaces in the best perfect matching. We show surprisingly different results for p = 1, p = 2, and p =∞. For p = 2, we reduce the problem to standard convolution, while for p = ∞ and p = 1, we reduce the problem to (min,+) convolution and (median,+) convolution. Then we solve the latter two convolution problems in subquadratic time, which are interesting results in their own right. These results shed some light on the classic sorting X + Y problem, because the convolutions can be viewed as computing order statistics on the antidiagonals of the X + Y matrix. All of our algorithms run in o(n) time, whereas the obvious algorithms for these problems run in Θ(n) time.
منابع مشابه
2 01 2 Necklaces , Convolutions , and X +
We give subquadratic algorithms that, given two necklaces each with n beads at arbitrary positions, compute the optimal rotation of the necklaces to best align the beads. Here alignment is measured according to the lp norm of the vector of distances between pairs of beads from opposite necklaces in the best perfect matching. We show surprisingly different results for p = 1, p even, and p = ∞. F...
متن کاملFast Algorithms to Generate Necklaces, Unlabeled Necklaces, and Irreducible Polynomials over GF(2)
Many applications call for exhaustive lists of strings subject to various constraints, such as inequivalence under group actions. A k-ary necklace is an Ž . equivalence class of k-ary strings under rotation the cyclic group . A k-ary unlabeled necklace is an equivalence class of k-ary strings under rotation and permutation of alphabet symbols. We present new, fast, simple, recursive algoŽ . rit...
متن کاملOn the Incomplete Gamma Function and the Neutrix Convolution
The incomplete Gamma function γ(α, x) and its associated functions γ(α, x+) and γ(α, x−) are defined as locally summable functions on the real line and some convolutions and neutrix convolutions of these functions and the functions x and x − are then found.
متن کاملOn cardinalities of k-abelian equivalence classes
Two words u and v are k-abelian equivalent if for each word x of length at most k, x occurs equally many times as a factor in both u and v. The notion of k-abelian equivalence is an intermediate notion between the abelian equivalence and the equality of words. In this paper, we study the equivalence classes induced by the k-abelian equivalence, mainly focusing on the cardinalities of the classe...
متن کاملA Gray Code for Necklaces of Fixed Density
A necklace is an equivalence class of binary strings under rotation In this paper we present a Gray code listing of all n bit necklaces with d ones so that i each necklace is listed exactly once by a representative from its equivalence class and ii successive representatives including the last and the rst in the list di er only by the transposition of two bits The total time required is O nN n ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006